import React, {
	Component
} from 'react';
import {
	StyleSheet,
	View,
	Text
} from 'react-native';

class TitleWithLine extends Component {
	constructor(props) {
		super(props);
		this.state = {

		};

	}

	_onPressButton() {
		alert('hello')
	}

	render() {
		return (
			<View style={{height:12,marginBottom:10,marginTop:10,flexDirection:'row',alignItems:'center'}}>
		<View style={styles.line}></View>
          <Text style={{width:100,height:12,textAlign:'center',fontSize:12,color:'#454545'}}>{this.props.title}</Text>
          <View style={styles.line}></View>
        </View>
		);
	}
}

//样式表
const styles = StyleSheet.create({
	line: {
		height: 1,
		backgroundColor: '#dfdfdf',
		flex: 1,
	}
});

export default TitleWithLine;